import { initMixin } from './init'
import { stateMixin } from './state'
import { renderMixin } from './render'
import { eventsMixin } from './events'
import { lifecycleMixin } from './lifecycle'
import { warn } from '../util/index'

//实力化 new Vue用到function
function Vue (options) {  //class Vue
  if (process.env.NODE_ENV !== 'production' &&
    !(this instanceof Vue)
  ) {
    warn('Vue is a constructor and should be called with the `new` keyword')
  }
  this._init(options)
}

initMixin(Vue) // 初始化的入口，各种初始化相关    ********  监听器  watcher props
stateMixin(Vue) // 绑定数据的核心  data props     ****
eventsMixin(Vue) // 初始化事件
lifecycleMixin(Vue)// 生命周期
renderMixin(Vue) // 渲染相关的方法， vnod虚拟dom  *******

export default Vue
